<template>
    <button @click="isdark=!isdark">aa</button>
  <DatePicker v-if="isdark" is-dark v-model="date" />
  <DatePicker v-if="!isdark" v-model="date" />
</template>

<script setup>
import { ref, onMounted } from 'vue'
var isdark = ref(window.matchMedia("(prefers-color-scheme: dark)").matches)

    /*
let content = document.getElementById("a");

if (dark) {
	//body.style.backgroundColor = "#1a1a1a";
	content.setAttribute("isdark", "");
} else {
	//body.style.backgroundColor = "#f5f5f5";
	content.removeAttribute("isdark");
}
*/
</script>
